<!doctype html>
<html class="no-js" lang="zxx" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>建议</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" type="image/x-icon" href="http://localhost:8080/assets/img/favicon.ico">
    <script src="http://localhost:8080/assets/js/main.js"></script>

    <!-- CSS here -->
    <link rel="stylesheet" href="http://localhost:8080/assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/owl.carousel.min.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/slicknav.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/animate.min.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/magnific-popup.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/fontawesome-all.min.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/themify-icons.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/slick.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/nice-select.css">
    <link rel="stylesheet" href="http://localhost:8080/assets/css/style.css">
</head>
<body>
<div th:replace="template.html::header"></div>
<main>
    <!-- login Area Start -->
    <div th:unless="${isAdmin}" class="login-form-area section-padding">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-xl-6 col-lg-7 col-md-10">
                    <form class="login-form" method="post" action="add-advice">
                        <!-- Login Heading -->
                        <div class="login-heading">
                            <span>提出建议</span>
                            <p th:style="${login_info_style}" th:text="${login_info}"></p>
                        </div>
                        <!-- Single Input Fields -->
                        <div class="input-box">
                            <div class="single-input-fields">
                                <label>电话联系：123456789</label>
                            </div>
                            <div class="single-input-fields">
                                <label>&emsp;&emsp; QQ：123456789</label>
                            </div>
                            <hr>
                            <p th:style="${advice_info_style}" th:text="${advice_info}"></p>
                            <div class="single-input-fields">
                                <label>您的建议:</label>
                                <input type="text" placeholder="建议内容(长度小于50位)" name="content">
                            </div>
                        </div>
                        <!-- form Footer -->
                        <div class="login-footer">
                            <button class="btn login-btn" type="submit">提交</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div th:if="${isAdmin}" class="job_listing_area section-bg2 " style="padding-top: 30px">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="job_lists m-0">
                        <div class="recent_joblist_wrap">
                            <div class="recent_joblist white-bg " style="margin-top: 120px;margin-bottom: 0">
                                <div class="row align-items-center">
                                    <div class="col-md-6">
                                        <h4>建议列表</h4>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row" id="list">
                            <form method="post" action="user" class="col-lg-12 col-md-12"
                                  th:each="ad : ${list}">
                                <label style="display: none">
                                    <input type="text" name="user-id" th:value="${ad.getId()}">
                                </label>
                                <div class="single_jobs white-bg d-flex justify-content-between">
                                    <div class="jobs_left d-flex align-items-center">
                                        <div class="jobs_conetent">
                                            <a><h4 th:text="${ad.getId()}"></h4></a>
                                            <div class="links_locat d-flex align-items-center">
                                                <div class="location">
                                                    <p>
                                                        <svg width="15" height="15" viewBox="0 0 48 48" fill="none"
                                                             xmlns="http://www.w3.org/2000/svg">
                                                            <rect x="4" y="8" width="40" height="36" fill="none"
                                                                  stroke="#333" stroke-width="4"
                                                                  stroke-linejoin="round"/>
                                                            <path fill-rule="evenodd" clip-rule="evenodd"
                                                                  d="M28 20V34H36V20H28Z" stroke="#333" stroke-width="4"
                                                                  stroke-linecap="round" stroke-linejoin="round"/>
                                                            <path d="M17 4V12" stroke="#333" stroke-width="4"
                                                                  stroke-linecap="round" stroke-linejoin="round"/>
                                                            <path d="M31 4V12" stroke="#333" stroke-width="4"
                                                                  stroke-linecap="round" stroke-linejoin="round"/>
                                                            <path d="M12 20H20V34H12" stroke="#333" stroke-width="4"
                                                                  stroke-linecap="round" stroke-linejoin="round"/>
                                                            <path d="M20 27H14" stroke="#333" stroke-width="4"
                                                                  stroke-linecap="round" stroke-linejoin="round"/>
                                                        </svg>
                                                        <a th:text="${ad.getTime()}"></a>
                                                    </p>
                                                </div>
                                            </div>
                                            <p th:text="${ad.getContent()}"></p>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <div class="col-lg-12">
                    <div class="job_filter white-bg">
                        <div class="form_inner white-bg">
                            <div class="row">
                                <div style="display: flex;margin: auto;" class="single_field">
                                    <input onclick="add(-1)" class="boxed-btn3" style="margin-right: 20px" value="上一页">
                                    <input onchange="change(this.value)" id="pager" type="number"
                                           value="1" min="1" disabled>
                                    <input onclick="add(1)" class="boxed-btn3" style="margin-left: 20px" value="下一页">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- login Area End -->
</main>
<div th:replace="template.html::footer"></div>
<!-- Scroll Up -->
<div id="back-top">
    <a title="Go to Top" href="#"> <i class="fas fa-level-up-alt"></i></a>
</div>
</body>
</html>